import config from "@/config"
import http from "@/utils/request"


export default {
    list: {
        url: `${config.API_URL}/course/list-page`,
        name: "获取列表",
        get: async function (params) {
            return await http.get(this.url, params);
        }
    },
    action: {
        url: `${config.API_URL}/course`,
        name: "用户操作",
        get: async function (params) {
            return await http.get(this.url, params);
        },
    },
    vocabulary: {
        list: {
            url: `${config.API_URL}/course-vocabulary/list-page`,
            name: "获取列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        }
    },
    category: {
        list: {
            url: `${config.API_URL}/course-category/list-page`,
            name: "获取列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        },
        all: {
            url: `${config.API_URL}/course-category/all`,
            name: "获取所有",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        }
    },
    level: {
        list: {
            url: `${config.API_URL}/course-level/list-page`,
            name: "获取列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        },
        all: {
            url: `${config.API_URL}/course-level/all`,
            name: "获取所有",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        }
    },
    difficulty: {
        list: {
            url: `${config.API_URL}/course-difficulty/list-page`,
            name: "获取列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        },
        all: {
            url: `${config.API_URL}/course-difficulty/all`,
            name: "获取所有",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        }
    },
    book: {
        list: {
            url: `${config.API_URL}/course-book/list-page`,
            name: "获取列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        },
        all: {
            url: `${config.API_URL}/course-book/all`,
            name: "获取所有",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        }
    },
    material: {
        list: {
            url: `${config.API_URL}/course-material/list-page`,
            name: "获取列表",
            get: async function (params) {
                return await http.get(this.url, params);
            }
        }
    }
}